﻿<Window x:Class="WpfGenetic.MainWindow"
        xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfGenetic"
        mc:Ignorable="d"
        Title="CryptoGen" Height="450" Width="800" Icon="Resources/genetic.ico">
    <Grid Margin="0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <DockPanel Grid.Column="0" Grid.Row="0" Margin="5, 0, 0, 0">
            <TextBlock Name="cryptoTextBlock" DockPanel.Dock="Top"  Margin="5, 5, 0, 0">
                Зашифрованный текст:
            </TextBlock>
            <TextBox Name="cryptoTextBox" TextWrapping="Wrap" 
                     AcceptsReturn="True" VerticalScrollBarVisibility="Visible">
            </TextBox>
        </DockPanel>

        <GridSplitter Grid.Column="0" Grid.Row="1" ShowsPreview="False" Height="3"
HorizontalAlignment="Stretch" VerticalAlignment="Center" Background="Gray"/>

        <DockPanel Grid.Column="0" Grid.Row="2" Margin="5, 0, 0, 0">

            <Grid DockPanel.Dock="Top">
                <TextBlock Name="logTextBlock" HorizontalAlignment="Left"  Margin="5, 5, 5, 5">
                    Лог:
                </TextBlock>
                <Button Name="clearLogButtin" HorizontalAlignment="Right" Width="100" Margin="5, 5, 5, 3" Click="ClearLogButton_Click">
                    Очистить
                </Button>
            </Grid>
            
            <TextBox Name="logTextBox" TextWrapping="Wrap" IsReadOnly="True"
                     AcceptsReturn="True" VerticalScrollBarVisibility="Visible">
            </TextBox>
        </DockPanel>

        <GridSplitter Grid.Column="0" Grid.Row="3" ShowsPreview="False" Height="3"
HorizontalAlignment="Stretch" VerticalAlignment="Center" Background="Gray"/>

        <DockPanel Grid.Column="0" Grid.Row="4" Margin="5, 0, 0, 0">
            <TextBlock Name="resultTextBlock" DockPanel.Dock="Top"  Margin="5, 5, 0, 0">
        Результат дешифровки:
            </TextBlock>
            <TextBox Name="resultTextBox" TextWrapping="Wrap" IsReadOnly="True"
                     AcceptsReturn="True" VerticalScrollBarVisibility="Visible">
            </TextBox>
        </DockPanel>

        <GridSplitter Grid.Column="1" Grid.Row="0" Grid.RowSpan="5" ShowsPreview="False" Width="3"
    HorizontalAlignment="Center" VerticalAlignment="Stretch" Background="Gray"/>

        <StackPanel Grid.Column="2" Grid.Row="0" Grid.RowSpan="3" Orientation="Vertical">

            <StackPanel Orientation="Horizontal">

                <TextBlock Name="stopwatchHeading" Margin="5">Время работы алгоритма: </TextBlock>

                <TextBlock Name="stopwatchValue" Margin="5">0.0</TextBlock>

            </StackPanel>

            <StackPanel Grid.Column="2" Grid.Row="0" Grid.RowSpan="3" Orientation="Horizontal">
                <StackPanel>
                    <Button Name="decryptButton" IsDefault="True" Click="DecryptButton_Click"
    VerticalAlignment="Center" Width="100" Height="30"
    Margin="5" Content="Дешифровать">
                    </Button>

                    <Button Name="stopDecryptButton" Click="StopDecryptButton_Click"
    VerticalAlignment="Center" Width="100" Height="30"
    Margin="5" Content="Остановить" IsEnabled="False">
                    </Button>

                    <Button Name="continueDecryptButton" Click="ContinueDecryptButton_Click"
    VerticalAlignment="Center" Width="100" Height="30"
    Margin="5" Content="Продолжить" IsEnabled="False">
                    </Button>

                    <Button Name="cancelDecryptButton" Click="CancelDecryptButton_Click"
    VerticalAlignment="Center" Width="100" Height="30"
    Margin="5" Content="Завершить" IsEnabled="False">
                    </Button>

                    <Button Name="settingsButton" Click="SettingsButton_Click"
    VerticalAlignment="Center" Width="100" Height="30"
    Margin="5" Content="Настройки">
                    </Button>
                </StackPanel>

                <StackPanel>
                    <ComboBox Name="cb_CipherType" SelectionChanged="ComboBox_CipherType_SelectionChanged"
                  VerticalAlignment="Center" MinWidth="100" MinHeight="30" Margin="5">
                        <ComboBoxItem>
                            <TextBlock>Шифр Виженера</TextBlock>
                        </ComboBoxItem>
                        <ComboBoxItem>
                            <TextBlock>Перестановочный шифр</TextBlock>
                        </ComboBoxItem>
                    </ComboBox>
                </StackPanel>
            </StackPanel>
        </StackPanel>

        <ScottPlot:WpfPlot x:Name="plot_GraphTopFitness" Grid.Column="3" Grid.Row="5"/>


    </Grid>
</Window>
